package com.dick.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dick.base.model.BaseDict;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BaseDictMapper extends BaseMapper<BaseDict> {

    @Select("SELECT * FROM BASE_DICT")
    List<BaseDict> selectAll();

    @Update("UPDATE BASE_DICT SET DELETED = 0 WHERE ID = #{id}")
    int recoveryById(Long id);
}
